package com.bltec.emergency.service.foreignService.impl;

import com.bltec.emergency.mapper.ForeignBaseMapper;
import com.bltec.emergency.model.ForeignBase;
import com.bltec.emergency.service.foreignService.ForeignBaseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ForeignBaseServiceImpl implements ForeignBaseService {
    @Resource
    private ForeignBaseMapper foreignBaseMapper;
    @Override
    public boolean add(ForeignBase foreignBase) {
        return foreignBaseMapper.insert(foreignBase);
    }

    @Override
    public boolean deleteForeignBaseById(Long id) {
        return foreignBaseMapper.setDisableById(id);
    }

    @Override
    public boolean updateForeignBaseById(ForeignBase foreignBase) {
        return foreignBaseMapper.updateForeignBaseById(foreignBase);
    }

    @Override
    public ForeignBase getForeignBaseById(Long id) {
        return foreignBaseMapper.getForeignBaseById(id);
    }

    @Override
    public List<ForeignBase> getAll() {
        return foreignBaseMapper.selectAll();
    }
}
